#ifndef CTRL_CONTROL_CENTER_HPP
#define CTRL_CONTROL_CENTER_HPP

#include "Ctrl/ProjectController.hpp"
#include "Ctrl/PackageController.hpp"
#include "Ctrl/SelectionModel.hpp"

namespace Ctrl
{

/// @ingroup Ctrl
/// @brief It aggregates all the specialized controllers into one point and provides unique access through a singleton.
class CTRL_API ControlCenter
{
	ControlCenter() {}

public:
	/// @brief It gets the controller dealing with project changes.
	/// @{
	ProjectController& prjController() { return prjController_; }
	const ProjectController& prjController() const { return prjController_; }
	/// @}

	/// @brief It gets the controller dealing with package changes.
	/// @{
	PackageController& packageController() { return packageController_; }
	const PackageController& packageController() const { return packageController_; }
	/// @}

	/// @brief It gets the selection model, managing the selected entities.
	/// @{
	SelectionModel& selectionModel() { return selectionModel_; }
	const SelectionModel& selectionModel() const { return selectionModel_; }
	/// @}

	/// @brief It gets the singleton instance of this class.
	static ControlCenter& instance() { return CENTER_; }

private:
	ProjectController prjController_;
	PackageController packageController_;
	SelectionModel selectionModel_;

private:
	static ControlCenter CENTER_;
};
 
} // namespace Ctrl

#endif // CTRL_CONTROL_CENTER_HPP
